package com.prs.crm.service.impl;

import org.courser.ui.PaginationSupport;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.AttachmentDao;
import com.prs.crm.domain.Attachment;
import com.prs.crm.service.AttachmentService;

public class AttachmentServiceImpl extends BaseServiceImpl<Attachment,AttachmentDao> implements AttachmentService{

	public PaginationSupport listAttachment(PaginationSupport page,Class<?> entityCls,String attachProperty)
	{
		DetachedCriteria criteria = this.createQuery(entityCls);
		criteria.add(Restrictions.isNotNull(attachProperty));
		return super.listByPage(criteria, page);
	}
	

}
